from django.conf.urls import include, url


# Routers provide an easy way of automatically determining the URL conf.
from rest_framework import routers
from configs.views.UserView import UserViewSet, ApiEndpoint
from configs.views.JerarquiaAcadView import JerarquiaAcadViewSet
from configs.views.InstitucionView import InstitucionViewSet
from configs.views.FacultadView import FacultadViewSet
from configs.views.CarreraView import CarreraViewSet
from configs.views.EscuelaView import EscuelaViewSet
from configs.views.NaturalPersonView import NaturalPersonViewSet
from configs.views.TipoDocumentoView import TipoDocumentoViewViewSet

from .views.UnidadMedidaView import UnidadMedidaViewSet
from .views.InsumoView import InsumoViewSet
from .views.CategoriaView import CategoriaViewSet

# Routers provide an easy way of automatically determining the URL conf.
router = routers.DefaultRouter()

router.register(r'categorias', CategoriaViewSet)
router.register(r'insumos', InsumoViewSet)
router.register(r'unidadmedidas', UnidadMedidaViewSet)

router.register(r'users', UserViewSet)
router.register(r'tipodocumento', TipoDocumentoViewViewSet)
router.register(r'naturalpersons', NaturalPersonViewSet)
router.register(r'jerarquiaacads', JerarquiaAcadViewSet)
router.register(r'institucions', InstitucionViewSet)
router.register(r'facultads', FacultadViewSet)
router.register(r'carreras', CarreraViewSet)
router.register(r'escuelas', EscuelaViewSet)

urlpatterns = [

    url(r'^', include(router.urls)),
    url(r'^api/hello', ApiEndpoint.as_view()),  # and also a resource server!

]
